import request from "@/utils/request";
// 获取用户列表
export function  getrole(page,limit,keyword){
    return request({
        url:`admin/acl/role/${page}/${limit}`,
        params: {
            roleName: keyword
          }
    })
}
export function addsave(data){
    return request({
        method:'post',
        url:'admin/acl/role/save',
        data
    })
}
export function updaterole(data){
    return request({
        method:'put',
        url:'admin/acl/role/update',
        data
    })
}
export function toAssign(id){
    return request({
        url:'admin/acl/permission/toAssign/' + id
    })
}
// ?roleId=${roleId}&permissionId=${permissionId}
export function doAssign(roleId,permissionId){
    return request({
        method:'post',
        url:`admin/acl/permission/doAssign?roleId=${roleId}&permissionId=${permissionId}`
    
    })
}
export function remove(id){
    return request({
        method:'delete',
        url:'admin/acl/role/remove/' + id
    })
}
 